<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<jsp:useBean id="utilities" class="masterpiece.util.Utilities" scope="session" />
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Log Out</title>
<link rel="stylesheet" type="text/css" href="css/default.css" />
</head>
<body>
<%
  if (!utilities.isConnected()) {
	  out.println("<p class=\"message success\">Already logged out.</p>");
  } else {
	  try {
      utilities.closeDB();
      out.print("<p class=\"message success\">DB connection closed successfully.</p>");
    } catch (Exception e) {
      out.print("<p class=\"message error\">Error when closing connection: "+e.getMessage()+"</p>");
    }
  }
  %>
  <p class="buttons"><a href="home.html">Log in again</a></p>
</body>
</html>